<script setup lang="ts">
import { computed, onMounted, ref, watch } from "vue";
import { type IconConfig } from "@/types";
import { store } from "@/pinia";

/**
 * 图标参数
 */
const props = defineProps<{
  code: string; // 配置编码
}>();

const { idGeneratorStore } = store(); // 全局ID生成器
const elementId = ref(idGeneratorStore.incr("icon")); // 图标元素ID

/**
 * 获取元素
 */
const currentElement = (): HTMLElement => {
  return document.querySelector(`#${elementId.value}`)!;
};

onMounted(() => {});

watch(
  () => props.code,
  (newVal, oldVal) => {}
);
</script>

<template>
  <div class="container"></div>
</template>

<style lang="scss" scoped></style>
